﻿

CREATE PROCEDURE [dbo].[balcon_GetConturiFolosite]
	@CodUnitate smallint
AS
BEGIN
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT DISTINCT co.* FROM Conturi co JOIN Rulaje rul ON (co.Cont=rul.ContDebit OR co.Cont=rul.ContCredit) AND co.CodUnitate=rul.CodUnitate
	WHERE co.CodUnitate =@CodUnitate
END